<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="../../include/admincontent.jsp" %>
<div id="Content">
    <form id="bsExcelValid" method="post" action="/Do/BS/ImportAction?pid=${pid}&fid=${fid}&deptcode=${deptcode}" enctype="multipart/form-data">
<%--    <form id="bsExcelValid" enctype="multipart/form-data">--%>
        <input type="hidden" name="pid" value="${pid}"/>
        <input type="hidden" name="fid" value="${fid}"/>
        <input type="hidden" name="deptcode" value="${deptcode}"/>
        <div class="help">
            <b>注意：</b><br>
            1、您必须先导出笔试安排，修改其中的笔试成绩，再使用本功能导入笔试成绩。导入成绩将覆盖已有的成绩。<br>
            2、只有发送短信通知以后才能导入笔试成绩。<br>
            3、数据导入请上传excel格式(<b>后缀为：xls,xlsx</b>)文件。如果文件数据太大，请拆分为多个文件进行多次导入。<br>
            4、系统自动识别列名分别为:<b style="color: #ff6209">身份证号</b>、<b style="color: #ff6209">综合素质</b>、<b style="color: #ff6209">综合素质结果</b>、
            <b style="color: #ff6209">个性测评</b>、<b style="color: #ff6209">个性测评结果</b>、<b style="color: #ff6209">专业测评</b>、<b style="color: #ff6209">专业测评结果</b>、
            <b style="color: #ff6209">本轮成绩</b>、<b style="color: #ff6209">成绩评定</b>。<br>
            5、结果状态为:<b style="color: #ff0000">通过</b>、<b style="color:  #ff0000">不通过</b>
        </div>
        <table class="treeTable searchform">
            <thead>
            <tr>
                <td width="80">Excel文件：</td>
                <td>
                    <div><input type="file" name="excel" datatype="*" nullmsg="请选择Excel文件"/></div>
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <button id="btn_imports" type="submit"   class="op">导入成绩</button>
                <%--    <button type="button" class="op" onclick="getListTable()">IFRAM测试</button>--%>
                </td>
            </tr>
            </thead>
        </table>
    </form>
</div>
<script src="/resources/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
  //  $(document).ready(function() {
        var fl = false;
        $("#bsExcelValid").Validform({
            tiptype:function(msg){
                if(fl){
                    if(msg == "请选择Excel文件")
                        layer.msg("请先选择需要导入的EXCEL文件！", {icon: 2});
                }
                fl =true;
            },
            ajaxPost: true,
            beforeSubmit:function(curform){
                curform.ajaxSubmit({
                    type:'post',
                    success:function(data){
                        if(data.state){
                           /* var mainifram=parent.document.getElementById("mainiframe");
                            var cwindow=mainifram.contentWindow;
                            cwindow.getList();*/
                            var index = parent.layer.getFrameIndex(window.name);
                           // location.reload();
                            parent.layer.alert(data.Message, {icon: 1,time:2000});
                        }
                        else{
                            parent.layer.alert(data.Message, {icon: 2,time:2000});
                        }
                    }
                });
                return false;
            }
        });
  // });

</script>
</body>
</html>